package com.sg.dto.biz.calc.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;


/**
 * @desc ComplexCalcOfMultipleNumDto
 * @使用场景
 */
@Data
public class ComplexCalcOfMultipleNumDto extends BaseDto implements Serializable {

    /**
     * 数据结果ID
     */
    @NotNull(message = "数据结果ID 不能为空")
    @ApiModelProperty("数据结果ID ")
    private String dataResultId;

    /**
     * 归属内容表主键ID
     */
    @NotNull(message = "归属内容表主键ID不能为空")
    @ApiModelProperty("归属内容表主键ID")
    private String entityId;

    /**
     * 数据值结果
     */
    @NotNull(message = "数据值结果不能为空")
    @ApiModelProperty("数据值结果")
    private Double dataResult;

    /**
     * 权重分值
     */
    @ApiModelProperty("权重分值")
    private Double weightScore;

    /**
     * 权重
     */
    @ApiModelProperty("权重")
    private Double weightValue;
    /**
     * 通用主键ID
     */
    @ApiModelProperty("通用主键ID")
    private String commPrimaryKey;

    /**
     * 计算入参1
     */
    @ApiModelProperty("计算入参1")
    private Double calcPara1;

    /**
     * 计算入参2
     */
    @ApiModelProperty("计算入参2")
    private Double calcPara2;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        ComplexCalcOfMultipleNumDto that = (ComplexCalcOfMultipleNumDto) o;
        return dataResultId == that.dataResultId && entityId == that.entityId && dataResult == that.dataResult && weightScore == that.weightScore && weightValue == that.weightValue && commPrimaryKey == that.commPrimaryKey && calcPara1 == that.calcPara1 && calcPara2 == that.calcPara2;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), dataResultId, entityId, dataResult, weightScore, weightValue, commPrimaryKey, calcPara1, calcPara2);
    }


}
   